//     https://ac.nowcoder.com/acm/contest/11163/A


#include <iostream>
#include <algorithm>
using namespace std;

bool YES(int a, int b, int c)
{
    if (a + b > c && a + c > b && b + c > a)  return 1;
    else return 0;
}

int main()
{
    int n;
    cin >> n;
    while (n--)
    {
        int s[6];
        for (int i = 0; i < 6; i++)
            cin >> s[i];
        sort(s, s + 6);
        bool find = 0;
        do
        {
            if (YES(s[0], s[1], s[2]) && YES(s[3], s[4], s[5]))
            {
                find = 1;
                break;
            }
        } while (next_permutation(s, s + 6));

        if (find != 0)  cout << "Yes" << endl;
        else  cout << "No" << endl;
    }

    return 0;
}